﻿using Fozzy.Being;
using Fozzy.Object;

using System.Globalization;
using System.Xml;
using System.Xml.Linq;

namespace Fozzy.Gedcom
{
    /// <summary>
    /// One family group. 
    /// </summary>
    [XAlias("NOTE")]
    public class Note                               : Fozzy.Object.XNode
    {
        #region States
        #endregion

        #region Properties

        #endregion

        #region Constructeur
            public Note(XElement node)              : base(node)
            {}
        #endregion

            /// <summary>
            /// Import the note info from the GEDCOM XMl file.
            /// </summary>
            [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
            private static void ImportNote(Person person, XmlNode node)
            {
                try
                {
                    //string value = GetValue(node, "NOTE");
                    //if (!string.IsNullOrEmpty(value))
                    //{
                    //    person.Story = new Story();
                    //    string storyFileName = new StringBuilder(person.Name).Append(".rtf").ToString();
                    //    person.Story.Save(value, storyFileName);
                    //}
                }
                catch
                {
                    // There was an error importing the note, ignore
                    // and continue processing the GEDCOM XML file.
                }
            }
    }
}
